package com.vegetable.modules.entity.stock;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.vegetable.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 代办库存表
 * </p>
 *
 * @author wangruijie
 * @since 2024-04-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="AgentStock对象", description="代办库存表")
public class AgentStock extends BaseEntity {

    @ApiModelProperty(value = "代办交货单号")
    private String docNo;

    @ApiModelProperty(value = "订单时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date orderTime;

    @ApiModelProperty(value = "代办人id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long agentId;

    @ApiModelProperty(value = "代办人名称")
    private String agentName;

    @ApiModelProperty(value = "商品ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long commodityId;

    @ApiModelProperty(value = "商品名称")
    private String commodityName;

    @ApiModelProperty(value = "商品编码")
    private String commonCode;

    @ApiModelProperty(value = "规格ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long specsId;

    @ApiModelProperty(value = "规格名称")
    private String specsName;

    @ApiModelProperty(value = "标准")
    private BigDecimal standard;

    @ApiModelProperty(value = "数量")
    private Integer number;

    @ApiModelProperty(value = "重量")
    private BigDecimal weight;

}
